Fixes for (#124212, Marco Pesenti Gritti):
authorMatthias Clasen <maclas@gmx.de>
Fri, 10 Oct 2003 20:54:50 +0000 (20:54 +0000)
committerMatthias Clasen <matthiasc@src.gnome.org>
Fri, 10 Oct 2003 20:54:50 +0000 (20:54 +0000)
Fri Oct 10 22:50:05 2003  Matthias Clasen  <maclas@gmx.de>

Fixes for (#124212, Marco Pesenti Gritti):

* gtk/gtkuimanager.c (update_smart_separators): Don't spit
warnings for popups.
(_gtk_menu_is_empty): Return FALSE for non-menus.

ChangeLog
ChangeLog.pre-2-10
ChangeLog.pre-2-4
ChangeLog.pre-2-6
ChangeLog.pre-2-8
gtk/gtkuimanager.c

index 4066cb70b45402605454f40dd11522c38a1319eb..5446484d445c7514c62f5fe712f4727f626b06a9 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+Fri Oct 10 22:50:05 2003  Matthias Clasen  <maclas@gmx.de>
+
+       Fixes for (#124212, Marco Pesenti Gritti):
+       
+       * gtk/gtkuimanager.c (update_smart_separators): Don't spit 
+       warnings for popups.
+       (_gtk_menu_is_empty): Return FALSE for non-menus.
+
 Fri Oct 10 19:10:12 2003  Kristian Rietveld  <kris@gtk.org>
 
        * gtk/gtkcombo.h: Deprecate.
index 4066cb70b45402605454f40dd11522c38a1319eb..5446484d445c7514c62f5fe712f4727f626b06a9 100644 (file)
@@ -1,3 +1,11 @@
+Fri Oct 10 22:50:05 2003  Matthias Clasen  <maclas@gmx.de>
+
+       Fixes for (#124212, Marco Pesenti Gritti):
+       
+       * gtk/gtkuimanager.c (update_smart_separators): Don't spit 
+       warnings for popups.
+       (_gtk_menu_is_empty): Return FALSE for non-menus.
+
 Fri Oct 10 19:10:12 2003  Kristian Rietveld  <kris@gtk.org>
 
        * gtk/gtkcombo.h: Deprecate.
index 4066cb70b45402605454f40dd11522c38a1319eb..5446484d445c7514c62f5fe712f4727f626b06a9 100644 (file)
@@ -1,3 +1,11 @@
+Fri Oct 10 22:50:05 2003  Matthias Clasen  <maclas@gmx.de>
+
+       Fixes for (#124212, Marco Pesenti Gritti):
+       
+       * gtk/gtkuimanager.c (update_smart_separators): Don't spit 
+       warnings for popups.
+       (_gtk_menu_is_empty): Return FALSE for non-menus.
+
 Fri Oct 10 19:10:12 2003  Kristian Rietveld  <kris@gtk.org>
 
        * gtk/gtkcombo.h: Deprecate.
index 4066cb70b45402605454f40dd11522c38a1319eb..5446484d445c7514c62f5fe712f4727f626b06a9 100644 (file)
@@ -1,3 +1,11 @@
+Fri Oct 10 22:50:05 2003  Matthias Clasen  <maclas@gmx.de>
+
+       Fixes for (#124212, Marco Pesenti Gritti):
+       
+       * gtk/gtkuimanager.c (update_smart_separators): Don't spit 
+       warnings for popups.
+       (_gtk_menu_is_empty): Return FALSE for non-menus.
+
 Fri Oct 10 19:10:12 2003  Kristian Rietveld  <kris@gtk.org>
 
        * gtk/gtkcombo.h: Deprecate.
index 4066cb70b45402605454f40dd11522c38a1319eb..5446484d445c7514c62f5fe712f4727f626b06a9 100644 (file)
@@ -1,3 +1,11 @@
+Fri Oct 10 22:50:05 2003  Matthias Clasen  <maclas@gmx.de>
+
+       Fixes for (#124212, Marco Pesenti Gritti):
+       
+       * gtk/gtkuimanager.c (update_smart_separators): Don't spit 
+       warnings for popups.
+       (_gtk_menu_is_empty): Return FALSE for non-menus.
+
 Fri Oct 10 19:10:12 2003  Kristian Rietveld  <kris@gtk.org>
 
        * gtk/gtkcombo.h: Deprecate.
index c3040c295091b581540ea0388268f24371b6c8a8..bb0b171aee279d8141321ff89790e14d4109e748 100644 (file)
@@ -1662,7 +1662,7 @@ _gtk_menu_is_empty (GtkWidget *menu)
   g_return_val_if_fail (menu == NULL || GTK_IS_MENU (menu), TRUE);
 
   if (!menu)
-    return TRUE;
+    return FALSE;
 
   children = gtk_container_get_children (GTK_CONTAINER (menu));
 
@@ -1772,8 +1772,10 @@ update_smart_separators (GtkWidget *proxy)
          GtkWidget *item;
 
          item = gtk_menu_get_attach_widget (GTK_MENU (parent));
-         _gtk_action_sync_menu_visible (NULL, item, empty);
-         g_object_set (G_OBJECT (filler), "visible", empty, NULL);
+         if (GTK_IS_MENU_ITEM (item))
+           _gtk_action_sync_menu_visible (NULL, item, empty);
+         if (GTK_IS_WIDGET (filler))
+           g_object_set (G_OBJECT (filler), "visible", empty, NULL);
        }
     }
 }